#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

//自定义标题栏中...
//void TitleBar::updateMaximize()
//{
//    QWidget *pWindow = this->window();
//    if (pWindow->isTopLevel())
//    {
//        bool bMaximize = pWindow->isMaximized();
//        m_pMaximizeButton->setToolTip(bMaximize ? tr("Restore") : tr("Maximize"));
//        m_pMaximizeButton->setProperty("maximizeProperty", bMaximize ? "restore" : "maximize");

//        // 手动更新样式
//        m_pMaximizeButton->style()->unpolish(m_pMaximizeButton);
//        m_pMaximizeButton->style()->polish(m_pMaximizeButton);
//        m_pMaximizeButton->update();
//        //m_pMaximizeButton->setStyle(QApplication::style());
//    }
//}

MainWindow::~MainWindow()
{
    delete ui;
}
